<%--
 *  File:    CountyAreaSummary.jsp
 *  @Author: JackYin 
 *  Date:    2011/1/12

 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
 

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="http://dcms.oval.com/page/dcms" prefix="dcms" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  Category cat = Category.getInstance("jsp.CountyAreaSummary");
  String privilegeCode = "10385";
  String strModuleName = "ERM";
  String strTableName = "v_zylcountyareasummary1";
%>

<%@include file="/inc/PageDefault.inc"%>


<%@include file="/inc/FrmDefault.inc"%>
<%@include file="/inc/LocationDefault.inc"%>
<%@ include file="/rpt/ReportURL.inc"%>
<html>
<head>
<title>CountyAreaSummary</title>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/<%= strLanguageCode %>/main.css" type="text/css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/<%= strLanguageCode %>/summary.css" type="text/css">
<LINK href="<%=request.getContextPath()%>/css/<%=strLanguageCode%>/main.htm" type=text/css>
<script language="JavaScript" src="<%=request.getContextPath() %>/js/ScriptLib.js"></script>
<%
HashMap CurUserInfo = (HashMap)session.getAttribute("userinfo");
Integer userid = (Integer)CurUserInfo.get("userid");
%>
<script>
function export_info(){
    var employeename=document.__otherSearchConditionForm.employeename.value;
	//if(employeename=="" || employeename==null)employeename=-1;
	var __searchvalue;
	var obj=document.getElementById('__searchnamealias');
	var index =obj.selectedIndex;
	//var val = obj.options[index].text;
	var __searchname = obj.options[index].columnname;
	if(typeof (obj.options[index].type) != 'undefined'){
	  if(obj.options[index].type=='select'){
		
	  var 	obj1=document.getElementById("__searchvalue_selected");
	  var index1 =obj1.selectedIndex;
	   __searchvalue=obj1.options[index1].value;
	  }
	}else{
		__searchvalue=document.getElementById("__searchvalue").value
	}
	
	if(!isEmpty(__searchvalue)){
       window.open("<%= reportURL %>/servlet/ExcecuteReport/countyorgsummary.sox?__format=xlsx&__folder=/ovalreport&globalpccode=116&employeeid="+<%=userid %>+"&issalesman="+<%=CurUserInfo.get("issalesman") %>+"&employeename="+escape(encodeURI(employeename))+'&'+__searchname+'='+escape(encodeURI(__searchvalue)));
	}else{
	    //alert("<%= reportURL %>/servlet/ExcecuteReport/HospitalSummary.sox?__format=xlsx&__folder=/ovalreport&globalpccode=113&employeeid="+<%=userid %>+"&issalesman="+<%=CurUserInfo.get("issalesman") %>+"&employeename="+escape(encodeURI(employeename))+"&regioncode="+escape(encodeURI(regioncode)));
		window.open("<%= reportURL %>/servlet/ExcecuteReport/countyorgsummary.sox?__format=xlsx&__folder=/ovalreport&globalpccode=116&employeeid="+<%=userid %>+"&issalesman="+<%=CurUserInfo.get("issalesman") %>+"&employeename="+escape(encodeURI(employeename)));
		
	}
 //window.open("<%= reportURL %>/servlet/ExcecuteReport/countyorgsummary.sox?__format=xlsx&__folder=/ovalreport&userid="+<%=userid %>);
}
</script>  
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
 
 <%
 String s1=label.getLabelName("L_Summary");
 String str =label.getLabelName("L_ThreeRelationship");
 %>
 
<dcms:summary id="ogm.zylreportcountysummary" needNew="true" needEdit="true">

	<dcms:param name="userid" property="session:userinfo.userid"/>
	<dcms:param name="languagecode"  property="session:languagecode"/>
	
   <dcms:summaryTab id="newTab" name="<%=s1%>"  href="/zyl/masterdata/erm/CountyAreaEdit.jsp"/> 
   <dcms:summaryTab id="attributeTab" name="<%=str%>"  href="/zyl/masterdata/erm/ZylMasterdataRelationship.jsp?globalpccode=116"/>
   <dcms:summaryAction actionFuction="__export('XLSX')" labelCode="L_ALL_Execcd" styleWidth="70" privilegeCode="MB-YS03"/>
   <dcms:summaryAction actionFuction="export_info" labelCode="L_Upload_Derived" styleWidth="77" privilegeCode="MB-YS04"/>
   <dcms:otherSearchCondition>
   <iframe id="reloadHandler" name="reloadHandler" style="display:none"></iframe>
     <table width="100%" cellspacing="0" cellpadding="0" border="0">
     <tr style="text-align:left"><td style="text-align:left"><%= label.getLabelName("L_EmployeeName") + label.getLabelName("L_Colon") %>
             <custom:text  property="employeename" size="30"/>
              </td>
			</tr>
        </table>
  </dcms:otherSearchCondition>  
</dcms:summary>

</body>
<script>
  document.getElementById("__searchvalue").onkeydown=function seachKeyDown()
  {
   // alert(event.keyCode);
    if(event.keyCode==13)
    {
      __summaryGo(document.getElementById("__summaryConfigID").value,document.getElementById("__indicatorImagePath").value,document.getElementById("__summaryRootPath").value,'');
    }
  }
</script> 
</html>